{% extends 'base.html' %}

{% block content %}
{% if form.non_field_errors %}
  <div class="alert alert-danger">
    {% for error in form.non_field_errors %}
      {{ error }}
    {% endfor %}
  </div>
{% endif %}
<form method="post" action="{% url 'signup' %}">
  {% csrf_token %}
  <div class="form-group">
      <label for="{{ form.username.id_for_label }}">用  户  名:</label>
      {{ form.username }}
  </div>
  <div class="form-group">
      <label for="{{ form.email.id_for_label }}">邮      箱:</label>
      {{ form.email }}
  </div>
  <div class="form-group">
      <label for="{{ form.password1.id_for_label }}">密      码:</label>
      {{ form.password1 }}
  </div>
  <div class="form-group">
      <label for="{{ form.password2.id_for_label }}">确认密码:</label>
      {{ form.password2 }}
  </div>
  <div class="modal-footer">
      <button type="submit" class="btn btn-primary">注册</button>
      <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">关闭</button>
  </div>
</form>


  {% endblock %}